package com.chat.module.email.req;

import lombok.Data;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

@Data
public class MailActionVo {
    @Data
    public static class sendEmail {
        /**
         * 系统邮件标题
         */
        private String title;

        /**
         * 系统邮件内容
         */
        private String content;

        /**
         * 指定系统邮件有效天数
         */
        private Integer expirationDay;

        /**
         * 用户id
         */
        private List<Long> uidList;

        /**
         * 附件
         */
        private Map<String, Object> attachment;

        /**
         * 获取附件-物品
         */
        @SuppressWarnings("unchecked")
        public static Map<Long, Long> obtainProp(Map<String, Object> attachment) {
            Object o = attachment.get("prop");
            if (o == null) {
                return null;
            }
            return (Map<Long, Long>) attachment.get("prop");
        }
    }


    /////////// 系统邮件和玩家关联表的字段 //////////////

    /**
     * 附件领取状态
     */
    private String attachmentClaimed;

    /**
     * 系统邮件是否已读
     */
    private String readStatus;


    /**
     * 玩家uid
     */
    private Long playerUid;

    /**
     * 系统邮件id
     */
    private Long systemEmailId;


}
